package com.cloud.wms.ui.main.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class UserEntity implements Parcelable {
    private long userID;
    private String loginNO;
    private String userName;
    private int userType;
    private String password;
    private int locked;
    private int enabled;
    private int departmentID;
    private int companyID;
    private int isSuperAdmin;
    private int jobStationID;
    private int productCategory;

    public long getUserID() {
        return userID;
    }

    public void setUserID(long userID) {
        this.userID = userID;
    }

    public String getLoginNO() {
        return loginNO == null ? "" : loginNO;
    }

    public void setLoginNO(String loginNO) {
        this.loginNO = loginNO;
    }

    public String getUserName() {
        return userName == null ? "" : userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }

    public String getPassword() {
        return password == null ? "" : password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getLocked() {
        return locked;
    }

    public void setLocked(int locked) {
        this.locked = locked;
    }

    public int getEnabled() {
        return enabled;
    }

    public void setEnabled(int enabled) {
        this.enabled = enabled;
    }

    public int getDepartmentID() {
        return departmentID;
    }

    public void setDepartmentID(int departmentID) {
        this.departmentID = departmentID;
    }

    public int getCompanyID() {
        return companyID;
    }

    public void setCompanyID(int companyID) {
        this.companyID = companyID;
    }

    public int getIsSuperAdmin() {
        return isSuperAdmin;
    }

    public int getJobStationID() {
        return jobStationID;
    }

    public void setJobStationID(int jobStationID) {
        this.jobStationID = jobStationID;
    }

    public int getProductCategory() {
        return productCategory;
    }

    public void setProductCategory(int productCategory) {
        this.productCategory = productCategory;
    }

    public void setIsSuperAdmin(int isSuperAdmin) {
        this.isSuperAdmin = isSuperAdmin;
    }

    public UserEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.userID);
        dest.writeString(this.loginNO);
        dest.writeString(this.userName);
        dest.writeInt(this.userType);
        dest.writeString(this.password);
        dest.writeInt(this.locked);
        dest.writeInt(this.enabled);
        dest.writeInt(this.departmentID);
        dest.writeInt(this.companyID);
        dest.writeInt(this.isSuperAdmin);
        dest.writeInt(this.jobStationID);
        dest.writeInt(this.productCategory);
    }

    protected UserEntity(Parcel in) {
        this.userID = in.readLong();
        this.loginNO = in.readString();
        this.userName = in.readString();
        this.userType = in.readInt();
        this.password = in.readString();
        this.locked = in.readInt();
        this.enabled = in.readInt();
        this.departmentID = in.readInt();
        this.companyID = in.readInt();
        this.isSuperAdmin = in.readInt();
        this.jobStationID = in.readInt();
        this.productCategory = in.readInt();
    }

    public static final Creator<UserEntity> CREATOR = new Creator<UserEntity>() {
        @Override
        public UserEntity createFromParcel(Parcel source) {
            return new UserEntity(source);
        }

        @Override
        public UserEntity[] newArray(int size) {
            return new UserEntity[size];
        }
    };
}
